﻿using AutoMapper;
using Domain.Entity;
using Domain.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Application.CMKService
{
    public class CMKService : ICMKService
    {
        private readonly IMapper mapper;
        public ICMKRepository CMKRepository { get; set; }

        public CMKService(IMapper mapper, ICMKRepository CMKRepository)
        {
            this.mapper = mapper;
            this.CMKRepository = CMKRepository;

        }
        public Task<int> DeleteCMK(int id)
        {
           return CMKRepository.DeleteCMK(id);
        }

        public List<CMK> GetCMK()
        {
           return CMKRepository.GetCMK();
        }

        public Task<int> AddCMK(CMK cMK)
        {
           return CMKRepository.AddCMK(cMK);
        }
    }
}
